<template>
	<view class="g-pinia-a">
		<view >Pinia A组件:  {{counterStore.count}}</view>
		<button type="default" @click="onPlus">加一</button>
	</view>
</template>

<script setup>
    import {useCounterStore} from '@/stores/counter.js'
	const counterStore = useCounterStore()
	
	const onPlus = ()=>{
		counterStore.plus()
	}
</script>

<style scoped>
.g-pinia-a{
	width: 400rpx;
	height: 400rpx;
	background-color: pink;
}
</style>